import java.math.BigDecimal;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test05 {
	public static void main(String[] args) {
//			Pattern p = Pattern.compile("mms.mnc(\\d{3}).mcc(\\d{3}).gprs");
//			Matcher m = p.matcher("mms.mnc500.mcc311.gprs");
//			m.matches();
//			System.out.println("mms.mnc500.mcc311.gprs".matches("mms.mnc\\d{3}.mcc\\d{3}.gprs"));
//			System.out.println("192.168.10.191".matches("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"));
//			System.out.println(m.matches());
//			m.reset();
//			while(m.find()){
//				System.out.println(m.group());
//				System.out.println(m.group(0));
//				System.out.println(m.group(1));
//				System.out.println(m.group(2));
//				
//			}
//		
		
			Pattern p5 = Pattern.compile("(\\d{3,5})([a-z]{2})");
			String s5 = "123aa-34345bb-234cc-00";
			Matcher m5 = p5.matcher(s5);
			while(m5.find()) {
				System.out.println(m5.group());
				System.out.println(m5.group(1));
				System.out.println(m5.group(2));
			}
		
//			Pattern p6 = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})");
//			String s6 = "dd2012-02-13 00:00:00";
//			Matcher m6 = p6.matcher(s6);
//			while(m6.find()) {
//				System.out.println(m6.group());
//				System.out.println(m6.group(0));
//				System.out.println(m6.group(1));
//			}
	}
	
	private void formLog(){
		String s5 = "|24945|A1DA2AE295AB66E7E12512193DBF495A|1|Aicent|271|2|192.168.25.77|leo|MSIE 8.0|2012-04-22 23:24:21|10.10.55.98/amr/login.jsp|530||||";
		Pattern p5 = Pattern.compile("(\\d{3,5})([a-z]{2})");
		Matcher m5 = p5.matcher(s5);
		while(m5.find()) {
			System.out.println(m5.group());
			System.out.println(m5.group(1));
			System.out.println(m5.group(2));
		}
	}
}